import React from 'react'
import Child from './Child'
import './less.css'
import {Button} from 'antd'


export default class Life extends React.Component {

  constructor(props) {
    super(props)
    console.log(props)
    this.state = {
      count: 0
    }
  }


  handleAdd() {
    this.setState({
      count: this.state.count + 1
    })
  }
  render() {
    return <div className="content">
      <Button>122</Button>
      <p>react 生命周期介绍</p>
      <button onClick={this.handleAdd.bind(this)}>点击</button>
      <p>{this.state.count}</p>
      <Child name="lx"></Child>
    </div>
  }
}